*******************************************************************************
* Shell
*
* (C)  Copyright Apple Computer, Inc. 1988
* All rights reserved.
*
* by Jim Mensch and Keith Rollin
* June 30, 1988
*
* This program shows the bare minimum that an Application should do in order
* to work correctly on the IIgs in the desktop environment. It also shows how
* to start up all the tools necessary to run and gives a sample event loop.
*
* How to use: Use this program as a template whenever you start out to write
* a desktop program. It is broken up into simple modules, that can be added
* to, modified, or removed.
*
* Demo Index:
*	Tool Startup
*	Simple Event Loop
*	Alert Box
*	Simple menu dispatch
*	Simple menu creation
*
*
* Files: System macros and equates.
*
*
* Modification History:
*
* Version 1.0	Mensch & Rollin
*
*      June 30, 1988
*
*      First Release
*
*******************************************************************************
**********************************************************************
*                                                                    *
*             Apple IIGS Source Code Sampler, Volume I               *
*                                                                    *
*             Copyright (c) Apple Computer, Inc. 1988                *
*                       All Rights Reserved                          *
*                                                                    *
*            Written by Apple II Developer Tech Support              *
*                                                                    *
*                                                                    *
*                                                                    *
*  ----------------------------------------------------------------  *
*                                                                    *
*     This program and its derivatives are licensed only for         *
*     use on Apple computers.                                        *
*                                                                    *
*     Works based on this program must contain and                   *
*     conspicuously display this notice.                             *
*                                                                    *
*     This software is provided for your evaluation and to           *
*     assist you in developing software for the Apple IIGS           *
*     computer.                                                      *
*                                                                    *
*     DISCLAIMER OF WARRANTY                                         *
*                                                                    *
*     THE SOFTWARE IS PROVIDED "AS IS" WITHOUT                       *
*     WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,               *
*     WITH RESPECT TO ITS MERCHANTABILITY OR ITS FITNESS             *
*     FOR ANY PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO             *
*     THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH            *
*     YOU.  SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU (AND            *
*     NOT APPLE OR AN APPLE AUTHORIZED REPRESENTATIVE)               *
*     ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING,             *
*     REPAIR OR CORRECTION.                                          *
*                                                                    *
*     Apple does not warrant that the functions                      *
*     contained in the Software will meet your requirements          *
*     or that the operation of the Software will be                  *
*     uninterrupted or error free or that defects in the             *
*     Software will be corrected.                                    *
*                                                                    *
*     SOME STATES DO NOT ALLOW THE EXCLUSION                         *
*     OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY              *
*     NOT APPLY TO YOU.  THIS WARRANTY GIVES YOU SPECIFIC            *
*     LEGAL RIGHTS AND YOU MAY ALSO HAVE OTHER RIGHTS                *
*     WHICH VARY FROM STATE TO STATE.                                *
*                                                                    *
*                                                                    *
**********************************************************************
	eject
	PRINT NOGEN,NOHDR

	STRING ASIS

	PRINT PUSH,OFF
	INCLUDE 'M16.Util'
	INCLUDE 'M16.ProDOS'
	INCLUDE 'M16.MiscTool'
	INCLUDE 'M16.QUICKDRAW'
	Include 'M16.QDAux'
	INCLUDE 'E16.Quickdraw'
	INCLUDE 'M16.MEMORY'
	INCLUDE 'E16.Memory'
	INCLUDE 'M16.EVENT'
	Include 'E16.Event'
	INCLUDE 'M16.LOCATOR'
	INCLUDE 'M16.Menu'
	INCLUDE 'M16.Control'
	INCLUDE 'M16.Window'
	INCLUDE 'E16.Window'
	INCLUDE 'M16.Dialog'
	INCLUDE 'E16.Dialog'
	INCLUDE 'M16.LineEdit'
	INCLUDE 'M16.IntMath'
	INCLUDE 'M16.Scrap'
	INCLUDE 'M16.Desk'
	INCLUDE 'M16.Texttool'
	PRINT POP

*******************************************************************************
*
*    Equates used in this program.
*
*******************************************************************************
DPHandle	equ 0	; Handle to Tool Direct Page area
DPPointer	equ DPHandle+4	; Pointer to Tool Direct Page area
deref	equ DPPointer+4	; Temporary Handle dereference area

ScreenMode	equ Mode640
ScreenWidth	equ 640

; menu item numbers for standard DA menu items
FirstItem	equ 250
UndoItem	equ 250
CutItem	equ 251
CopyItem	equ 252
PasteItem	equ 253
ClearItem	equ 254
CloseItem	equ 255


	EJECT
*******************************************************************************
*
Main	PROC
*
* Description:	This is the main routine. It calls routines to Initialize
*	the tools, initialize application specific data, run the
*	main EventLoop, close the application, and close the tools.
*	Then it calls the ProDOS Quit command.
*
*
* Inputs:	NONE
*
* Outputs:	NONE
*
* External Refs:
	import InitTools
	import InitApp
	import EventLoop
	import CloseApp
	import CloseTools
	import QuitParms
*
* Entry Points:	NONE
*
*******************************************************************************

	jsr InitTools
	jsr InitApp

	_ShowCursor

	jsr EventLoop
	
	jsr CloseApp
	jsr CloseTools

	_Quit QuitParms

	ENDP

	EJECT
*******************************************************************************
*
Globals	Record
*
* Description:	Holder of all of our data.
*
*
* Inputs:	N/A
*
* Outputs:	N/A
*
* External Refs:	NONE
*
* Entry Points:
	export QuitParms	; used by Main
*
*******************************************************************************
*
* Standard global data
*
*******************************************************************************

TitleString	str 'Apple IIgs Shell Application'
AutString	str 'By Mensch and Rollin Apple DTS ©1988 Apple Computer'
VersString	str 'Version: 1.0'

MenuHeight	ds.B 2	; Stored height of menu bar
MyID	ds.B 2	; Application ID

QuitFlag	ds.W 1
QuitParms	dc.L 0	; Pathname of next app
	dc.W $00	; flags

EventRecord
EventWhat	ds.B 2
EventMessage	ds.B 4
EventWhen	ds.B 4
EventWhere	ds.B 4
EventModifiers	ds.B 2
TaskData	ds.B 4
TaskMask	dC.L $0000FFFF	; Handle all events possible

	EJECT
*******************************************************************************
*
* Application specific global data
*
*******************************************************************************

; This is a list of pointers to the text that is used to create our menus. It
; is used by InitApp to find all of the menu templates and use them to create
; our menubar. This loop loads MenuPtrLen-4 into an index, gets the
; corresponding menu template pointer in this table, and uses that in a
; NewMenu call. It then decrements the index by 4, and repeats the procees
; until the index is negative.

MenuPtr	dc.l AppMenu
	dc.l FileMenu
	dc.l EditMenu
MenuPtrLen	equ *-MenuPtr

; Menu list: menu items should be numbered consecutivly starting from 250.
; As a convention, use 256 as about and 257 as Quit.

AppMenu	dc.B '$$@\N1',$0D
	dc.B '--About Shell Application...\N256V',$00
	dc.B '.'
FileMenu	dc.B '$$  File  \N2',$00
	dc.B '--Close Document\N255DV',$00
	dc.B '--Quit\N257*Qq',$00
	dc.B '.'
EditMenu	dc.B '$$  Edit  \N3',$00
	dc.B '--Undo\N250*ZzVD',$00
	dc.B '--Cut\N251*XxD',$00
	dc.B '--Copy\N252*CcD',$00
	dc.B '--Paste\N253*VvD',$00
	dc.B '--Clear\N254D',$00
	dc.b '.'

; Flag telling if the system window is the top window or not. This is set to
; the output of a GetWKind call.
WindType	ds.B 2
	EndR

	EJECT
*******************************************************************************
*
InitTools	PROC
*
* Description:	Load and initialize the tools needed. Errors are detected
*	and FatalError is called if any occur. If there aren't any
*	errors, the list of menu templates is read and the menu-
*	bar is created.
*
*
* Inputs:	NONE
*
* Outputs:	NONE
*
* External Refs:
	import FatalError
*
* Entry Points:	NONE
*
*******************************************************************************
	with Globals

;
;   Tool Direct page offsets here
;
QDDPage	equ $0000
EMDPage	equ QDDPage+$0300
CtlDPage	equ EMDPage+$0100
MenuDPage	equ CtlDPage+$0100
LEDPage	equ MenuDPage+$0100
ToolDPSize	equ LEDPage+$0100

	phk	; Save program bank register and
	plb	; load it as the data bank register

	_TLStartup	; Start Tool Locator

	pha	; Space for result
	_MMStartup	; Start memory manager
	PullWord MyID	; Save it for later use

	_MTStartup	; Start up Misc Tools

	_IMStartup	; Start integer math toolset

	PushLong #ToolTable	; Pointer to Tool table
	_LoadTools	; Load all RAM based tools
	bcc IT0005	; Carry clear means no error
	brl FatalError	; Tools can't be loaded. Fatal error!

IT0005

; Get memory for Tool Direct pages

	pha	; Room for result
	pha
	PushLong #ToolDPSize; Number of bytes needed
	PushWord MyID	; ID of this application
	PushWord #AttrLocked+attrFixed+attrPage+attrBank
	PushLong #0	; Allocate them in bank 0
	_NewHandle
	bcc IT0010	; Test carry for error
	brl FatalError	; If no memory we got a fatal error!

IT0010	PullLong DPHandle	; Retrieve handle to our DPage area

	lda [DPHandle]	; Dereference the handle to get a ptr
	sta DPPointer	; to our direct page area and save it.

	PushWord DPPointer	; QuickDraw uses 3 pages of Dpage
	PushWord #ScreenMode; Used to set all master SCB's
	PushWord #0	; Zero means use default buf size
	PushWord MyID	; Application ID for allocating data
	_QDStartup	; Start QuickDraw, turn on SHR Screen
	bcc IT0015
	brl FatalError	; If it can't be started then bomb

IT0015
	_QDAuxStartup
	
	lda DPPointer	; Create address for Event Mgr DPage by
	clc	; loading in the pointer to the start
	adc #EMDPage	; of DPage and adding Evt Mgr offset.
	pha	; Now push it on the stack.
	PushWord #20	; Size of event queue.
	PushWord #0	; MouseClamp values.
	PushWord #ScreenWidth ; These will clamp mouse to screen
	PushWord #0	; area only.
	PushWord #200
	PushWord MyID
	_EMStartup	; Start the event manager
	bcc IT0020
	brl FatalError
IT0020
	PushWord MyID	; Startup the Window Manager
	_WindStartup
	bcc IT0025
	brl FatalError
IT0025
	PushWord MyID	; startup the control manager
	lda DPPointer
	clc
	adc #CtlDPage
	pha
	_CtlStartup
	bcc IT0030
	brl FatalError
IT0030

	PushWord MyID	; menu manager startup
	lda DPPointer
	clc
	adc #MenuDPage
	pha
	_MenuStartUp
	bcc IT0035
	brl FatalError
IT0035
	PushWord MyID	; Line edit Startup
	lda DPPointer
	clc
	adc #LEDPage
	pha
	_LEStartUp
	bcc IT0040
	brl FatalError
IT0040
	PushWord MyID	; Dialog manager startup
	_DialogStartup
	bcc IT0045
	brl FatalError
IT0045
	_ScrapStartup	; No errors possible for this call

	_DeskStartup	; No error possible for this call

; insert application specific tools here

	PushLong #0	; refresh the whole desktop
	_RefreshDeskTop

;
; Create the menus I need
;

	ldx #MenuPtrLen-4	; Get a pointer to the last menu	
loop	phx	; Save menu table index on the stack
	pha	; Push on space for the menu handle
	pha	;   returned by NewMenu
	lda MenuPtr+2,x	; Push on the pointer to the template
	pha	;   to be used by NewMenu when
	lda MenuPtr,x	;   creating the menu
	pha
	_NewMenu	; Create a new menu
	PushWord #0	; Tell InsertMenu where to put it
	_InsertMenu	; Insert it.
	plx	; Get our index back off the stack
	dex	; Point to the next template pointer
	dex
	dex
	dex
	bpl loop	; Go back up if not done yet.

	PushWord #1	; Add NDA's
	_FixAppleMenu

	pha	; Call FixMenuBar to cause the menu
	_FixMenuBar	; Compute standard menu sizes
	PullWord MenuHeight	; and store the menu height for later

	_DrawMenuBar	; Finally, draw it.

	RTS
	
; Data Block for LoadTools call
ToolTable	dc.W 7	; total number of entries in the table	
	dc.W 14,$0100	; Window Manager
	dc.W 15,$0100	; Menu Manager
	dc.W 16,$0100	; Control Manager
	dc.W 18,$0100	; QD Aux
	dc.W 20,$0100	; LineEdit tool set
	dc.W 21,$0100	; Dialog Manager
	dc.W 22,$0100	; Scrap manager
	
; Some common tools not used in this application. To use these, copy the data
; line to the above table, update the total number of tools in the table
; and then insert the proper startup and shutdown calls
;	dc.W 19,$0100	; Print Manager
;	dc.W 23,$0100	; Standard File Operations
;	dc.W 25,$0100	; Note Synthesizer
;	dc.W 27,$0100	; Font Manager
;	dc.W 28,$0100	; List Manager
;	dc.W 32,$0100	; MIDI Tools

	ENDP

	EJECT
*******************************************************************************
*
FatalError	PROC
*
* Description:	Routine that is called whenever a tool sends back an error
*	that can not be recovered from. This routine prints the
*	error on the screen, waits for a keypress then quits back
*	to whoever started this application up!
*
*
* Inputs:	A = Error number
*
* Outputs:	NONE (program exits)
*
* External Refs:
	import CloseTools
*
* Entry Points:	NONE
*
*******************************************************************************
	with Globals

	pha	; Push the error code
	PushLong #errNumStr	; Address of storage area
	PushWord #4	; Length of string
	_Int2Hex

	_GrafOff	; If QD Started, shut off graphics

	PushLong #ErrStr	; Write error message to the screen
	_WriteCString

	pha	; Space for result
	PushWord #0	; No echo
	_ReadChar	; Wait for a key to be pressed
	pla	; Discard the key

	jsr CloseTools	; Shut down all the tools in case
;		  any got started up

	_Quit QuitParms	; Quit back to where we came from.
; Quit can not fail, so we can never come back from the quit call.
	
ErrStr	dc.B 'A fatal error has occured $'
ErrNumStr	dc.B 'xxxx   press any key to exit',0

	ENDP

	EJECT
*******************************************************************************
*
CloseTools	PROC
*
* Description:	Shut down the tools I started.
*
*
* Inputs:	NONE
*
* Outputs:	NONE
*
* External Refs:	NONE
*
* Entry Points:	NONE
*
*******************************************************************************
	with Globals

	_DeskShutDown	; Shut down the tools in the reverse
	_ScrapShutDown	; order they were started.
	_DialogShutDown
	_LEShutDown
	_MenuShutDown
	_CtlShutDown
	_WindShutDown
	_EMShutDown
	_QDAuxShutDown
	_QDShutDown
	_MTShutDown

	PushLong DPHandle	; Dispose of all that DP memory
	_DisposeHandle

	PushWord MyID
	_MMShutDown
	_TLShutDown

	rts
	ENDP

	EJECT
*******************************************************************************
*
InitApp	PROC
*
* Description:	Perform any application specific initialization. For this
*	app, all we do is initialize the quitflag to zero. You 
*	might use this procedure to create windows, initialize vars
*	and allocate memory needed for the entire program.
*
* Inputs:	NONE
*
* Outputs:	NONE
*
* External Refs:	NONE
*
* Entry Points:	NONE
*
*******************************************************************************
	With Globals

	stz QuitFlag
	stz WindType
	
	rts
	ENDP



*******************************************************************************
*
CloseApp	PROC
*
* Description:	Close down things. This disposes of all items and memory
*	that we allocated. Usually undoes what was done in InitApp.
*
*
* Inputs:	NONE
*
* Outputs:	NONE
*
* External Refs:	NONE
*
* Entry Points:	NONE
*
*******************************************************************************
	With Globals
	
	rts
	ENDP

	EJECT
*******************************************************************************
*
EventLoop	PROC
*
* Description:	Main Event Loop. Handle things until user selects Quit.
*
*
* Inputs:	NONE
*
* Outputs:	NONE
*
* External Refs:
	import MenuSelect
	import ignore
	import doUpdate
	import testTopWindow
	import doSysChange
	import InContent
*
* Entry Points:	NONE
*
*******************************************************************************
	With Globals

	jsr TestTopWindow	; test to see if top window is a DA
	
	pha	; Push on space for TaskMaster result
	PushWord #EveryEvent ; GetNextEvent mask
	PushLong #EventRecord ; Pointer to Event Record
	_TaskMaster
	pla	; Get TaskMaster result
	
; Now that we have the task type, we first test to see if it was a Null event
; If it was a null event, this program will not handle it. If you want to handle 
; Null events in your application, remove the next line

	cmp #$1D	; see if we are outside the range of
	bge EventLoop	; tasks we handle, if so treat as a Null
	asl A	; Turn it into an index
	tax
	jsr (TaskTable,x)	; Call appropriate event handler

	lda QuitFlag	; Quit selected?
	beq EventLoop	; no - keep looping

	rts	; yes- leave the program

TaskTable	dc.W Ignore	; 0 Null
	dc.W Ignore	; 1 MouseDown
	dc.W Ignore	; 2 MouseUp
	dc.W Ignore	; 3 KeyDown
	dc.W Ignore	; 4 undefined
	dc.W Ignore	; 5 AutoKey
	dc.W doUpdate	; 6 Update
	dc.W Ignore	; 7 undefined
	dc.W Ignore	; 8 Activate
	dc.W Ignore	; 9 Switch
	dc.W Ignore	; 10 Desk accessory
	dc.W Ignore	; 11 Device driver
	dc.W Ignore	; 12 ap
	dc.W Ignore	; 13 ap
	dc.W Ignore	; 14 ap
	dc.W Ignore	; 15 ap
	dc.W Ignore	; TASK 0 indesk
	dc.W MenuSelect	; TASK 1 in menuBar
	dc.W Ignore	; TASK 2 in system window
	dc.W InContent	; TASK 3 in content
	dc.W Ignore	; TASK 4 in Drag
	dc.W Ignore	; TASK 5 in grow
	dc.W Ignore	; TASK 6 in goaway
	dc.W Ignore	; TASK 7 in zoom
	dc.W Ignore	; TASK 8 in info bar
	dc.W MenuSelect	; TASK 9 in special	menu
	dc.W Ignore	; TASK 10 in NDA
	dc.W Ignore	; TASK 11 in frame
	dc.W Ignore	; TASK 12 in drop

	ENDP

	EJECT
*******************************************************************************
*
MenuSelect	PROC
*
* Description:	This routine is called when TaskMaster returns a menu
*	event. It takes the menu item that was hit and calculates
*	an offset into the menu dispatch table. It then calls that
*	routine and unhilites the menu when it is done. 
*
* Inputs:	TaskData holds menu item selected.
*
* Outputs:	NONE
*
* External Refs:
	import ignore
	import doAbout
	import doQuit
*
* Entry Points:	NONE
*
*******************************************************************************
	With Globals

	lda TaskData	; Get the ID of the menu item selected.
	sec	; Turn it into an index by subtracting
	sbc #FirstItem	; the starting ID number (250) and mul-
	asl a	; tiplying by 2 (each table entry con-
	tax	; sists of 2 bytes).
	jsr (menuTable,x)	; Call the routine behind it.

	PushWord #0	; Routine done - unhilite the menubar.
	PushWord taskData+2
	_HiLiteMenu

	rts

MenuTable	dc.W Ignore	; undo
	dc.W Ignore	; cut
	dc.W Ignore	; copy
	dc.W Ignore	; paste
	dc.W Ignore	; clear
	dc.W Ignore	; close
	dc.W doAbout
	dc.W doQuit
	ENDP

	EJECT
*******************************************************************************
*
Ignore	PROC
*
* Description:	Called when I want to ignore an event.
*
*
* Inputs:	NONE
*
* Outputs:	NONE
*
* External Refs:	NONE
*
* Entry Points:	NONE
*
*******************************************************************************

	rts
	ENDP


	
*******************************************************************************
*
doUpdate	PROC
*
* Description:	Called by the Main Event Loop to update a window's
*	contents. This routine is only called if you are not
*	telling TaskMaster to perform updates.
*
*
* Inputs:	NONE
*
* Outputs:	NONE
*
* External Refs:	NONE
*
* Entry Points:	NONE
*
*******************************************************************************
	with Globals

	rts
	ENDP


	EJECT
*******************************************************************************
*
testTopWindow	PROC
*
* Description:	This routine is called on every NULL event. It checks the
*	type of the top window, if it has changed from App window
*	to system window or back, this routine will call DoSysChange
*
*
* Inputs:	None
*
* Outputs:	None
*
* External Refs:
	Import doSysChange
*
* Entry Points:
*
*******************************************************************************
	With Globals
	
	PushLong #0	; first get a pointer to the frontmost
	_FrontWindow	; window
	PullLong Deref	; store it in deref temporarily
	
	lda Deref	; first test for a NIL pointer. If its
	ora Deref+2	; NIL then we do not have to do the 
	beq TTW0010	; getWKind call
	
	PushWord #0	; if not a NIL pointer then get the
	PushLong Deref	; Kind of window
	_getWKind
	pla	
TTW0010
	cmp windType	; Now test the window kind to see if it
	beq TTW0020	; has changed, if not then ignore it
	
	sta windType	; if the window kind has changed, then
	jsr doSysChange	; save the new value and change menus
TTW0020
	rts
	EndP
	
	EJECT
*******************************************************************************
*
doSysChange	PROC
*
* Description:	Called by the Main Event Loop when the upper most window
*	has changed to or from a system window.
*
*
* Inputs:	<A> Bit 15 set if the top window is a system window
*
* Outputs:	NONE
*
* External Refs:	NONE
*
* Entry Points:	NONE
*
*******************************************************************************
	with Globals

	cmp #0
	beq SysDeact	; if high bit not set then App Window

; This routine enables the edit menu when a system window becomes active	
SysActivate		
	PushWord #UndoItem	; its an activate event so go thru and
	_EnableMItem	; enable all the edit items and the
	
	PushWord #CutItem	; close Item
	_EnableMItem
	
	PushWord #CopyItem
	_EnableMItem
	
	PushWord #PasteItem
	_EnableMItem
	
	PushWord #ClearItem
	_EnableMItem
	
	PushWord #CloseItem
	_EnableMItem
	rts

; This routine disables the edit menu when a system window is cover up	
SysDeact
	PushWord #UndoItem	; its an deactivate event so go thru 
	_DisableMItem	; and disable all the edit items and 
	
	PushWord #CutItem	; the close Item
	_DisableMItem
	
	PushWord #CopyItem
	_DisableMItem
	
	PushWord #PasteItem
	_DisableMItem
	
	PushWord #ClearItem
	_DisableMItem
	
	PushWord #CloseItem
	_DisableMItem
	
	rts
	ENDP

	EJECT
*******************************************************************************
*
InContent	PROC
*
* Description:	Called to handle clicks in a window's contents.
*
*
* Inputs:	NONE
*
* Outputs:	NONE
*
* External Refs:	NONE
*
* Entry Points:	NONE
*
*******************************************************************************
	with Globals

	rts
	ENDP

	EJECT
*******************************************************************************
*
doQuit	PROC
*
* Description:	Quit routine. Set the QuitFlag to TRUE for the EventLoop.
*	This is how we signal that the user wants to quit the
*	application.
*
*
* Inputs:	NONE
*
* Outputs:	QuitFlag set to $FFFF
*
* External Refs:	NONE
*
* Entry Points:	NONE
*
*******************************************************************************
	With Globals

	lda #$FFFF	; load any non-zero value
	sta QuitFlag	; and save it in the quitflag
	rts
	ENDP


	EJECT
*******************************************************************************
*
doAbout	PROC
*
* Description:	Bring up an Alert Dialog box with our name in it.
*
* Inputs:	NONE
*
* Outputs:	NONE
*
* External Refs:	NONE
*
* Entry Points:	NONE
*
*******************************************************************************
	With Globals

	pha	; space for result
	PushLong #AbtBox640	; pointer to alert template
	PushLong #0	; pointer to a filter proc (0=none)
	_NoteAlert
	pla	; get the item hit and dispose

	rts

; About Box alert template
; This is the 640 mode about box template. See the menus example program
; for an example of the same box in 320 mode.

AbtBox640	dc.W 30,30,100,590	; Bounding rectangle for the alert
	dc.W 1	; this is alert # 1
	dc.B alertDrawn	; flags for stage 1 (visible no beep)
	dc.B alertDrawn+1	; flags for stage 2 (visible 1 beep)
	dc.B alertDrawn+2	; flags for stage 3 (visible 2 beep)
	dc.B alertDrawn+3	; flags for stage 4 (visible 3 beep)
	dc.L OkButton	; ok button for the	alert
	dc.L AboutTitle	; title of the program
	dc.L AboutAut	; author
	dc.L AboutVers	; version number string
	dc.L 0	; nil to end the list

OKBTitle	dc.B 2,'OK'
OKButton	dc.W 1
	dc.W 50,500,65,550
	dc.W ButtonItem
	dc.L OKBTitle
	dc.W 0
	dc.W 0	; item flag
	dc.L 0	; no color table

AboutTitle	dc.W 2
	dc.W 10,100,20,550
	dc.W StatText+ItemDisable
	dc.L TitleString
	dc.W 0
	dc.W 0	; item flag
	dc.L 0	; no color table

AboutAut	dc.W 3
	dc.W 25,100,35,550
	dc.W StatText+ItemDisable
	dc.L AutString
	dc.W 0
	dc.W 0	; item flag
	dc.L 0	; no color table

AboutVers	dc.W 4
	dc.W 40,100,50,550
	dc.W StatText+ItemDisable
	dc.L VersString
	dc.W 0
	dc.W 0	; item flag
	dc.L 0	; no color table

	ENDP


	END

